# Maintainer: George Rawlinson <grawlinson@archlinux.org>
# Contributor: Kyle Keen <keenerd at gmail dot com>

pkgname=python-pyzmq
pkgver=25.1.1
pkgrel=1
pkgdesc='Python bindings for ZeroMQ'
arch=('loong64' 'x86_64')
url='https://zeromq.org/languages/python/'
license=('LGPL')
depends=('zeromq' 'python')
makedepends=(
  'git'
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-setuptools-scm'
  'python-wheel'
  'cython'
)
_commit='7777f2fa9461e0dd82c86d5c8303a1f5ff41cf53'
source=("$pkgname::git+https://github.com/zeromq/pyzmq#commit=$_commit")
b2sums=('SKIP')

pkgver() {
  cd "$pkgname"

  git describe --tags | sed 's/^v//'
}

build() {
  cd "$pkgname"

  python -m build --wheel --no-isolation
}

package() {
  cd "$pkgname"

  python -m installer --destdir="$pkgdir" dist/*.whl
}
